home *** CD-ROM | disk | FTP | other *** search
- Path: aux82.plano.net!user
- From: richmond@plano.net (Charles Richmond)
- Newsgroups: comp.lang.c
- Subject: Re: Best Binary Search Tree Balance Algo?
- Date: 10 Mar 1996 05:57:23 GMT
- Organization: Canine Organization
- Message-ID: <richmond-0903962355070001@aux82.plano.net>
- References: <4hqvc5$p9k@solaria.cc.gatech.edu>
- NNTP-Posting-Host: aux82.plano.net
-
- In article <4hqvc5$p9k@solaria.cc.gatech.edu>, bigdave@cc.gatech.edu
- (David Mitchell) wrote:
- > I would like to know what the run-time of the best binary search tree
- > balance algorithm is. (e.g. O(n^2), O(n lg n), etc.).
- >
- I believe the AVL balanced tree algorithm is the fastest. It works in
- big-O of log base 2 of n. The red/black balanced tree algorithm is
- *almost* as good. It works in the same big-O time, but has larger constant
- terms in the performance equation.
-
- Because you asked about binary trees, you are ruling out 2-3 B-trees and
- 2-4 B-trees. However, I do *not* think any of these beat the performance
- of the AVL algorithm. They work better when some of the data exists on
- disk and must be swapped into memory.
-